/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ClassFrame;

import java.util.Random;

/**
 *
 * @author DuyNT3
 */
public class RandomGenerator{
     public static int random(Random generator, int start, int end) {
        int range = Math.abs(end - start + 1);
        long fraction = (long) (range * generator.nextLong());
        int ran = (int) (fraction + start);
        return ran;
    }
}
